//
//  RoomIconButton.swift
//  HinsLive
//
//  Created by haoxian on 2019/4/29.
//  Copyright © 2019 Hins. All rights reserved.
//

import UIKit

class RoomIconButton: UIButton {
    
    let imageFrame: CGRect

    init(imageFrame: CGRect) {
        self.imageFrame = imageFrame
        super.init(frame: .zero)
        
        imageView?.contentMode = .scaleAspectFill
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        imageView?.frame = imageFrame
    }
    
}
